package com.example.dbpage.tool

import android.arch.lifecycle.LiveData
import android.arch.persistence.room.Dao
import android.arch.persistence.room.Insert
import android.arch.persistence.room.Query
import com.example.dbpage.bean.Device

/**
 * Created by zf on 2018/7/18.
 */

@Dao
interface DeviceDao {

    @Insert
    fun insert(device: Device): Long


    @Query("select * from device")
    fun getAllDevice(): LiveData<List<Device>>
}